﻿#include "mainwindow.h"
#include "./ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    connect(ui->lineEdit, &QLineEdit::textEdited, ui->label, &QLabel::setText);
    connect(ui->lineEdit, &QLineEdit::textEdited, ui->textBrowser, &QTextBrowser::setText);
    connect(ui->lineEdit, &QLineEdit::textEdited, this, &MainWindow::PrintText);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::PrintText(const QString& text)
{
    qDebug() << text;
}
